<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    window.alert()
    window.prompt()
    window.confrim:true false
    window.open()
    window.close()
    <hr>
    <button id="open1">点击</button>
    <hr>
    <button id="close1">关闭</button>
    <script>
        // 1.open 打开一个页面,参数是页面的地址以及打开方式的配置
        // open1.onclick=function(){
        //     window.open("http://www.jd.com","_self");//加了本地窗口打开
        // }
        // open1.onclick=function(){
        //     window.open("./05history.html","_self");//加了本地窗口打开
        // }

        // 2.close方法关闭一个页面,
        close1.onclick=function(){
            window.close();
        }
    </script>

</body>
</html>